package IOFlow.bufferedStreams.characterBufferedStream;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class CharacterBufferedOutputStream {
    public static void main(String[] args) throws IOException {
        /**
         * 字符缓冲输出流:
         *      构造方法:
         *          public BufferedWriter(Writer r)
         *      特有方法:
         *      public void newLine()    跨平台的换行
         */

        //如果文件不存在会创建一个，但要保证父级路径存在
        BufferedWriter bw=new BufferedWriter(new FileWriter("JavaCase\\Testa.txt",true));

        bw.write("阴阳师");
        bw.newLine();
        bw.write("率土之滨");
        bw.newLine();
        bw.close();













    }
}
